package com.wtx.chapter02;

/**
 * @description:
 * @author: wtx
 * @createDate: 2020/5/13
 */
public class Main {

    public static void main(String[] args) {

        Array array = new Array(20);
        for (int i = 0; i < 10; i++) {
            array.addLast(i);
        }
        System.out.println(array);

        array.add(1,100);
        System.out.println(array);





        /*int[] arr = new int[20];
        //长度不要直接写成10，硬编码的习惯不好
        for (int i = 0; i < arr.length; i++) {
            arr[i] = i;
        }
        int[] scores = new int[]{100,99,66};
        *//*for (int i = 0; i < scores.length; i++) {
            System.out.println(scores[i]);
        }*//*
        for (int score:scores) {
            System.out.println(score);
        }*/
    }
}
